﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 算法入门.Domain.Operations
{
    public class PermissionItem:BindableBase
    {
        private int perVal;

        /// <summary>
        /// 权限值
        /// </summary>
        public int PerVal
        {
            get { return perVal; }
            set { perVal = value; RaisePropertyChanged(); }
        }

        private string perName;

        /// <summary>
        /// 权限名称
        /// </summary>
        public string PerName
        {
            get { return perName; }
            set { perName = value; RaisePropertyChanged(); }
        }

        private string perBinStr;

        /// <summary>
        /// 权限的二进制字符串
        /// </summary>
        public string PerBinStr
        {
            get { return perBinStr; }
            set { perBinStr = value; RaisePropertyChanged(); }
        }


        private bool isChecked;

        /// <summary>
        /// 
        /// </summary>
        public bool IsChecked
        {
            get { return isChecked; }
            set { isChecked = value; RaisePropertyChanged(); }
        }
    }

    public enum Permission
    {
        /// <summary>
        /// 添加
        /// </summary>
        [Description("添加")]
        Add=1,
        /// <summary>
        /// 更新
        /// </summary>
        [Description("更新")]
        Update =2,
        /// <summary>
        /// 删除
        /// </summary>
        [Description("删除")]
        Delete =4,
        /// <summary>
        /// 查询
        /// </summary>
        [Description("查询")]
        Query =8
    }
}
